﻿using System;
using System.Collections.Generic;
using System.IO;
using XCommunity.Documents;
namespace XCommunity.Frames
{
  
  /// <summary>
  /// 话题对象基本接口
  /// </summary>
  public interface ITopicFrame
  {

    FrameService Service { get; }

    ICommunitySystem CommunitySystem { get; }


    Guid Guid { get; }

    int TopicId { get; }


    TopicMeta Meta { get; }


    IPostFrame Theme { get; }

    IEnumerable<IPostFrame> Responses { get; }

  }

  
  /// <summary>
  /// 实现这个接口使得TopicPersister可以将话题数据保存于磁盘。
  /// </summary>
  public interface IPersistableTopicFrame : ITopicFrame
  {
    void Save( Stream stream );

    void Load( Stream stream );

    bool Saved { get; }
  }
}
